Add {} to single line if.
authorCamila Ayres <hello@camilasan.com>
Tue, 18 Feb 2025 14:50:29 +0000 (15:50 +0100)
committerJyrki Gadinger <nilsding@nilsding.org>
Wed, 19 Feb 2025 07:52:54 +0000 (08:52 +0100)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/folder.cpp

index c73bb03684f05cad2ee4d534c1556a204099d2d8..12ceca25accba7752c9b4a3d8d063e425cb7d651 100644 (file)
@@ -1521,8 +1521,9 @@ void Folder::slotFolderConflicts(const QString &folder, const QStringList &confl
 void Folder::warnOnNewExcludedItem(const SyncJournalFileRecord &record, const QStringView &path)
 {
     // Never warn for items in the database
-    if (record.isValid())
+    if (record.isValid()) {
         return;
+    }
 
     // Don't warn for items that no longer exist.
     // Note: This assumes we're getting file watcher notifications
@@ -1530,15 +1531,18 @@ void Folder::warnOnNewExcludedItem(const SyncJournalFileRecord &record, const QS
     // on content change that would create spurious warnings.
     const auto fullPath = QString{_canonicalLocalPath + path};
     QFileInfo fi(fullPath);
-    if (!FileSystem::fileExists(fullPath))
+    if (!FileSystem::fileExists(fullPath)) {
         return;
+    }
 
     bool ok = false;
     auto blacklist = _journal.getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
-    if (!ok)
+    if (!ok) {
         return;
-    if (!blacklist.contains(path + "/"))
+    }
+    if (!blacklist.contains(path + "/")) {
         return;
+    }
 
     const auto message = FileSystem::isDir(fullPath)
         ? tr("The folder %1 was created but was excluded from synchronization previously. "